package com.tarzan.oauth.feign.fallback;

import com.tarzan.common.core.base.BaseResponse;
import com.tarzan.oauth.feign.RemotPermissionsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Package com.tarzan.oauth.feign.fallback
 * @Title RemotPermissionsServiceFallbackImpl
 * @Description TODO
 * @Author liujinshan
 * @CreateTime 2021/7/2 10:35
 */
@Slf4j
@Service
public class RemotPermissionsServiceFallbackImpl implements RemotPermissionsService {



    private Throwable cause;

    public Throwable getCause() {
        return cause;
    }

    public void setCause(Throwable cause) {
        this.cause = cause;
    }


    @Override
    public BaseResponse<List<String>> selectMenuPermsByUserId(Long userId) {
        BaseResponse<List<String>> response = new BaseResponse<>();
        log.error("feign 查询用户信息失败:{}", userId, cause);
        return response;
    }
}
